import {createStore, useStore} from 'vuex'
import {IAdminStore} from "@/headers/admin/store.h";
import {StoreKey} from "@/store/common";
import { AdminAction } from './action';
import { AdminMutation } from './mutation';
import {AdminGetter} from './getter'

const store = createStore<IAdminStore>({
    state():IAdminStore{
        return {
            userInfo:null
        }
    },
    actions:AdminAction,
    mutations:AdminMutation,
    getters:AdminGetter
})
export default store
export function useAdminStore() {
    return useStore<IAdminStore>(StoreKey.Admin)
}
